package 第六周;

public class PC {
    private CPU cpu;
    private HardDisk HD;

    public void setCpu(CPU cpu){
        this.cpu = cpu;
    }

    public void setHD(HardDisk HD){
        this.HD = HD;
    }

    public void show(){
        System.out.println("CPU的速度是："+cpu);
        System.out.printf("HardDisk的容量是："+HD.getAmount());
    }
}
